<?php

namespace IDock\Insurance\AICS\Request;

use Exception;
use IDock\Insurance\AICS\Request\AllAICSRequest;
use IDock\Insurance\AICS\Response\EPolicyDownloadResponse;
use IDock\Visitor\EPolicyDownloadVisitor;
use IDock\Visitor\ProposalRecallVisitor;

class EPolicyDownloadRequest extends AllAICSRequest
{
    public $code = 'DzbdWebService';

    public $envelopeName = 'tns:dzbdUrl';

    protected $response = EPolicyDownloadResponse::class;

    protected $urlTip = '电子保单下载';

    /*** @var EPolicyDownloadVisitor  $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        return [
            'condition' =>  [
                'policyNo' => $this->visitor->policyNo
            ],
        ];
    }
}
